package com.pcg.posgasstation.model.network.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class MemberInfoEntity implements Parcelable {

    private String license_corporation;
    private String license_name;
    private int companies_id;
    private int stores_id;
    private String members_card;
    private String tel;
    private String car_card;
    private String balance;
    private int balance_inter;
    private int members_level;
    private int members_type;
    private int use_type;
    private int cash_model;
    private String total_amount_limit;
    private String available_amount;
    private List<FoodPermitBean> food_permit;

    public String getLicense_corporation() {
        return license_corporation;
    }

    public void setLicense_corporation(String license_corporation) {
        this.license_corporation = license_corporation;
    }

    public String getLicense_name() {
        return license_name;
    }

    public void setLicense_name(String license_name) {
        this.license_name = license_name;
    }

    public int getCompanies_id() {
        return companies_id;
    }

    public void setCompanies_id(int companies_id) {
        this.companies_id = companies_id;
    }

    public int getStores_id() {
        return stores_id;
    }

    public void setStores_id(int stores_id) {
        this.stores_id = stores_id;
    }

    public String getMembers_card() {
        return members_card;
    }

    public void setMembers_card(String members_card) {
        this.members_card = members_card;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getCar_card() {
        return car_card;
    }

    public void setCar_card(String car_card) {
        this.car_card = car_card;
    }

    public String getBalance() {
        return balance;
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    public int getBalance_inter() {
        return balance_inter;
    }

    public void setBalance_inter(int balance_inter) {
        this.balance_inter = balance_inter;
    }

    public int getMembers_level() {
        return members_level;
    }

    public void setMembers_level(int members_level) {
        this.members_level = members_level;
    }

    public int getMembers_type() {
        return members_type;
    }

    public void setMembers_type(int members_type) {
        this.members_type = members_type;
    }

    public int getUse_type() {
        return use_type;
    }

    public void setUse_type(int use_type) {
        this.use_type = use_type;
    }

    public int getCash_model() {
        return cash_model;
    }

    public void setCash_model(int cash_model) {
        this.cash_model = cash_model;
    }

    public String getTotal_amount_limit() {
        return total_amount_limit;
    }

    public void setTotal_amount_limit(String total_amount_limit) {
        this.total_amount_limit = total_amount_limit;
    }

    public String getAvailable_amount() {
        return available_amount;
    }

    public void setAvailable_amount(String available_amount) {
        this.available_amount = available_amount;
    }

    public List<FoodPermitBean> getFood_permit() {
        return food_permit;
    }

    public void setFood_permit(List<FoodPermitBean> food_permit) {
        this.food_permit = food_permit;
    }

    public static class FoodPermitBean implements Parcelable {
        private int food_id;
        private String food_name;
        private String type_name;
        private String amount;

        public int getFood_id() {
            return food_id;
        }

        public void setFood_id(int food_id) {
            this.food_id = food_id;
        }

        public String getFood_name() {
            return food_name;
        }

        public void setFood_name(String food_name) {
            this.food_name = food_name;
        }

        public String getType_name() {
            return type_name;
        }

        public void setType_name(String type_name) {
            this.type_name = type_name;
        }

        public String getAmount() {
            return amount;
        }

        public void setAmount(String amount) {
            this.amount = amount;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.food_id);
            dest.writeString(this.food_name);
            dest.writeString(this.type_name);
            dest.writeString(this.amount);
        }

        public FoodPermitBean() {
        }

        protected FoodPermitBean(Parcel in) {
            this.food_id = in.readInt();
            this.food_name = in.readString();
            this.type_name = in.readString();
            this.amount = in.readString();
        }

        public static final Creator<FoodPermitBean> CREATOR = new Creator<FoodPermitBean>() {
            @Override
            public FoodPermitBean createFromParcel(Parcel source) {
                return new FoodPermitBean(source);
            }

            @Override
            public FoodPermitBean[] newArray(int size) {
                return new FoodPermitBean[size];
            }
        };
    }

    public MemberInfoEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.license_corporation);
        dest.writeString(this.license_name);
        dest.writeInt(this.companies_id);
        dest.writeInt(this.stores_id);
        dest.writeString(this.members_card);
        dest.writeString(this.tel);
        dest.writeString(this.car_card);
        dest.writeString(this.balance);
        dest.writeInt(this.balance_inter);
        dest.writeInt(this.members_level);
        dest.writeInt(this.members_type);
        dest.writeInt(this.use_type);
        dest.writeInt(this.cash_model);
        dest.writeString(this.total_amount_limit);
        dest.writeString(this.available_amount);
        dest.writeTypedList(this.food_permit);
    }

    protected MemberInfoEntity(Parcel in) {
        this.license_corporation = in.readString();
        this.license_name = in.readString();
        this.companies_id = in.readInt();
        this.stores_id = in.readInt();
        this.members_card = in.readString();
        this.tel = in.readString();
        this.car_card = in.readString();
        this.balance = in.readString();
        this.balance_inter = in.readInt();
        this.members_level = in.readInt();
        this.members_type = in.readInt();
        this.use_type = in.readInt();
        this.cash_model = in.readInt();
        this.total_amount_limit = in.readString();
        this.available_amount = in.readString();
        this.food_permit = in.createTypedArrayList(FoodPermitBean.CREATOR);
    }

    public static final Creator<MemberInfoEntity> CREATOR = new Creator<MemberInfoEntity>() {
        @Override
        public MemberInfoEntity createFromParcel(Parcel source) {
            return new MemberInfoEntity(source);
        }

        @Override
        public MemberInfoEntity[] newArray(int size) {
            return new MemberInfoEntity[size];
        }
    };
}
